/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package th.manager;

import com.google.inject.Inject;
import com.wideplay.warp.persist.Transactional;
import th.dao.JadualPenerbanganDAO;
import th.dao.PengiklananDAO;
import th.model.JadualPenerbangan;
import th.model.Pengiklanan;

/**
 *
 * @author fikri
 */
public class AdminManager {
    
    @Inject JadualPenerbanganDAO jadualPenerbanganDAO;
    
    @Inject PengiklananDAO pengiklananDAO;
    
    @Transactional
    public void save(JadualPenerbangan jadual){
        jadualPenerbanganDAO.saveOrUpdate(jadual);
    }
    
    @Transactional
    public void saveIklan(Pengiklanan iklan) {
        pengiklananDAO.saveOrUpdate(iklan);
    }
    
    //added by hasnor
    @Transactional
    public void deleteIklan(Pengiklanan iklan) {
        pengiklananDAO.delete(iklan);
    }
    
}
